package com.lovo.web.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDate;
import java.util.List;

/**
 * 商品表
 */
@Getter
@Setter
@TableName("product")
@NoArgsConstructor
@ApiModel(value ="商品表实体类",description = "商品表实体类")
public class ProductBean {
    /**商品主键*/
    @TableId(value = "pk_productId",type = IdType.AUTO)
    @ApiModelProperty(value = "商品主键")
    private long productId;

    /**商品名*/
    @TableField("p_productName")
    @ApiModelProperty(value = "商品名")
    private String productName;

    /**雪花id*/
    @TableField("p_snowId")
    @ApiModelProperty(value = "雪花id")
    private String snowId;

    /**商品类型*/
    @TableField("p_type")
    @ApiModelProperty(value = "商品类型")
    private String type;
    /**商品类型*/
    @TableField("p_status")
    @ApiModelProperty(value = "商品状态")
    private int status;

    /**商品属性（促销/普通）*/
    @TableField("p_isPromotion")
    @ApiModelProperty(value = "商品属性")
    private int isPromotion;

    /**商品原价*/
    @TableField("p_price")
    @ApiModelProperty(value = "建议销售价")
    private float price;

    /**折扣率*/
    @TableField("p_rate")
    @ApiModelProperty(value = "折扣率")
    private float rate;

    /**数量*/
    @TableField("p_num")
    @ApiModelProperty(value = "数量")
    private int num;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品明细集合")
    private List<ProductInfoBean> productInfoList;

    @TableField(exist = false)
    @ApiModelProperty(value = "前端商品图片展示")
    private String img;

}
